package com.example.springboot;

import com.example.springboot.entity.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.jws.soap.SOAPBinding;

@SpringBootApplication
@RestController
@RequestMapping
public class SpringbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }


    @GetMapping("/{msg}")
    public User hello(@PathVariable String msg) {
        User user = new User();
        user.setUsername(msg);
        return user;
    }

}
